using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region Community

	/// <summary>
	/// Community object for NHibernate mapped table 'community'.
	/// </summary>
	public class Community
	{
		#region Member Variables
		
		protected int _id;
		protected string _name;
		protected int _price;
		protected string _year;
		protected string _buildtype;
		protected string _developer;
		protected string _address;
		protected string _map;
		protected int _salecount;
		protected int _rentcount;
		protected string _region;
		protected string _regionarea;
		protected string _intro;
		protected int _totalcount;
		protected string _cover;

		#endregion

		#region Constructors

		public Community() { }

		public Community( string name, int price, string year, string buildtype, string developer, string address, string map, int salecount, int rentcount, string region, string regionarea, string intro, int count, string cover )
		{
			this._name = name;
			this._price = price;
			this._year = year;
			this._buildtype = buildtype;
			this._developer = developer;
			this._address = address;
			this._map = map;
			this._salecount = salecount;
			this._rentcount = rentcount;
			this._region = region;
			this._regionarea = regionarea;
			this._intro = intro;
			this._totalcount = count;
			this._cover = cover;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual string Name
		{
			get { return _name; }
			set
			{
				if ( value != null && value.Length > 200)
					throw new ArgumentOutOfRangeException("Invalid value for Name", value, value.ToString());
				_name = value;
			}
		}

		public  virtual int Price
		{
			get { return _price; }
			set { _price = value; }
		}

		public  virtual string Year
		{
			get { return _year; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Year", value, value.ToString());
				_year = value;
			}
		}

		public  virtual string Buildtype
		{
			get { return _buildtype; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Buildtype", value, value.ToString());
				_buildtype = value;
			}
		}

		public  virtual string Developer
		{
			get { return _developer; }
			set
			{
				if ( value != null && value.Length > 200)
					throw new ArgumentOutOfRangeException("Invalid value for Developer", value, value.ToString());
				_developer = value;
			}
		}

		public  virtual string Address
		{
			get { return _address; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Address", value, value.ToString());
				_address = value;
			}
		}

		public  virtual string Map
		{
			get { return _map; }
			set
			{
				if ( value != null && value.Length > 1000000)
					throw new ArgumentOutOfRangeException("Invalid value for Map", value, value.ToString());
				_map = value;
			}
		}

		public  virtual int Salecount
		{
			get { return _salecount; }
			set { _salecount = value; }
		}

		public  virtual int Rentcount
		{
			get { return _rentcount; }
			set { _rentcount = value; }
		}

		public  virtual string Region
		{
			get { return _region; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Region", value, value.ToString());
				_region = value;
			}
		}

		public  virtual string Regionarea
		{
			get { return _regionarea; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for Regionarea", value, value.ToString());
				_regionarea = value;
			}
		}

		public  virtual string Intro
		{
			get { return _intro; }
			set
			{
				if ( value != null && value.Length > 1000000)
					throw new ArgumentOutOfRangeException("Invalid value for Intro", value, value.ToString());
				_intro = value;
			}
		}

		public  virtual int TotalCount
		{
			get { return _totalcount; }
			set { _totalcount = value; }
		}

		public  virtual string Cover
		{
			get { return _cover; }
			set
			{
				if ( value != null && value.Length > 200)
					throw new ArgumentOutOfRangeException("Invalid value for Cover", value, value.ToString());
				_cover = value;
			}
		}

		

		#endregion
	}
	#endregion
}